package cn.zyy.service;

import cn.zyy.dao.UserDao;
import cn.zyy.dao.UserDaoImpl;
import cn.zyy.entity.Usr;

/**
 * 业务层  用于用户业务的处理
 */
public class UserServiceImpl implements UserService {
    private UserDao userDao = new UserDaoImpl();
    //用户的登录
    public Boolean login(Usr usr) {
//      Usr user = userDao.login(usr);
//      return user != null;
        return  userDao.login(usr) != null;
    }
    //用户的注册
    public Boolean register(Usr usr) {
//      int line = userDao.register(usr);
//      return line > 0;
        return userDao.register(usr) > 0;
    }
}
